package com.bfly.mall.advert.dto;

import com.bfly.mall.advert.enums.CouponStatus;
import com.bfly.mall.advert.enums.CouponUseRange;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 优惠卷列表DTO
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/9/15 20:48
 */
public class CouponListDTO implements Serializable {

    private static final long serialVersionUID = 5500998483902919800L;
    private int id;
    private String name;
    private String remark;
    private int total;
    private int remaining;
    private int limitNum;
    private BigDecimal discount;
    private BigDecimal minimums;
    private int status;
    private int days;
    private Date activityStart;
    private Date activityEnd;
    private int useRange;

    /**
     * 使用范围名称集合
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/21 11:20
     */
    private List<CouponProductNamesDTO> couponProductNames;

    public List<CouponProductNamesDTO> getCouponProductNames() {
        return couponProductNames;
    }

    public void setCouponProductNames(List<CouponProductNamesDTO> couponProductNames) {
        this.couponProductNames = couponProductNames;
    }

    /**
     * 使用范围名称
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/21 11:11
     */
    public String getRangeName() {
        CouponUseRange range = CouponUseRange.getRange(getUseRange());
        return range != null ? range.getName() : "";
    }

    /**
     * 状态名称
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/20 23:00
     */
    public String getStatusName() {
        CouponStatus status = CouponStatus.getStatus(getStatus());
        return status != null ? status.getName() : "";
    }

    public int getUseRange() {
        return useRange;
    }

    public void setUseRange(int useRange) {
        this.useRange = useRange;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getRemaining() {
        return remaining;
    }

    public void setRemaining(int remaining) {
        this.remaining = remaining;
    }

    public int getLimitNum() {
        return limitNum;
    }

    public void setLimitNum(int limitNum) {
        this.limitNum = limitNum;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    public BigDecimal getMinimums() {
        return minimums;
    }

    public void setMinimums(BigDecimal minimums) {
        this.minimums = minimums;
    }

    public int getDays() {
        return days;
    }

    public void setDays(int days) {
        this.days = days;
    }

    public Date getActivityStart() {
        return activityStart;
    }

    public void setActivityStart(Date activityStart) {
        this.activityStart = activityStart;
    }

    public Date getActivityEnd() {
        return activityEnd;
    }

    public void setActivityEnd(Date activityEnd) {
        this.activityEnd = activityEnd;
    }
}
